package com.vrp3d.domain.dto.user;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 修改密码
 *
 * @author vrp3d
 */
@Data
public class UserForChangePasswordDTO implements Serializable {

    private static final long serialVersionUID = 8357484478683278703L;

    @ApiModelProperty(value = "原密码", required = true)
    @NotBlank(message = "原密码不能为空")
    @Length(min = 8, max = 20, message = "密码长度必须在8-20之间")
    private String oldPassword;

    /**
     * 密码
     */
    @ApiModelProperty(value = "新密码", required = true)
    @NotBlank(message = "新密码不能为空")
    @Length(min = 8, max = 20, message = "密码长度必须在8-20之间")
    private String newPassword;

    /**
     * 确认密码
     */
    @ApiModelProperty(value = "确认密码", required = true)
    @NotBlank(message = "确认密码不能为空")
    @Length(min = 8, max = 20, message = "密码长度必须在8-20之间")
    private String confirmPassword;

}
